package Persons;
import Books.Booklist;
import Books.Book;

import java.util.Scanner;

public class main {
    public static User login(){
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入你的姓名");
        String name=sc.nextLine();
        System.out.println("请输入你的身份1.管理员 2.使用者");
        int chioce=sc.nextInt();
        if(chioce==1){
            return  new Administuser(name);
        }
        else {
            return new Normaluser(name);
        }
    }

    public static void main(String[] args) {
        User user=login();
        Booklist booklist=new Booklist();

        while (true){
           int chioce=user.meau();
           user.Dooperation(chioce,booklist);
          }
    }

}
